<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>邮件服务器配置 - Gweb</title>

		<meta name="description" content="Common form elements and layouts" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		
		<!-- ico -->
	  	<link th:href="@{/static/web/img/logos/logo.ico}" rel="shortcut icon" type="image/x-icon">
		
		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" th:href="@{/static/admin/css/bootstrap/bootstrap.min.css}" />
		<link rel="stylesheet" th:href="@{/static/admin/font-awesome/4.5.0/css/font-awesome.min.css}" />

		<!-- page specific plugin styles -->
		<link rel="stylesheet" th:href="@{/static/admin/css/jquery-ui/jquery-ui.custom.min.css}" />

		<!-- text fonts -->
		<link rel="stylesheet" th:href="@{/static/admin/css/fonts.googleapis.com.css}" />

		<!-- ace styles -->
		<link rel="stylesheet" th:href="@{/static/admin/css/ace/ace.min.css}" class="ace-main-stylesheet" id="main-ace-style" />

		<!--[if lte IE 9]>
			<link rel="stylesheet" th:href="@{/static/admin/css/ace/ace-part2.min.css}" class="ace-main-stylesheet" />
		<![endif]-->
		<link rel="stylesheet" th:href="@{/static/admin/css/ace/ace-skins.min.css}" />
		<link rel="stylesheet" th:href="@{/static/admin/css/ace/ace-rtl.min.css}" />

		<!--[if lte IE 9]>
		  <link rel="stylesheet" th:href="@{/static/admin/css/ace/ace-ie.min.css}" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->
		<script th:src="@{/static/admin/js/ace/ace-extra.min.js}"></script>

		<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

		<!--[if lte IE 8]>
		<script th:src="@{/static/admin/js/plugins/html5shiv.min.js}"></script>
		<script th:src="@{/static/admin/js/plugins/respond.min.js}"></script>
		<![endif]-->
	</head>

	<body class="no-skin">
	
		<!-- 公共页面的头部 -->
	  	<div th:insert="admin/common/header :: header"></div>

		<div class="main-container ace-save-state" id="main-container">
			<script type="text/javascript">
				try{ace.settings.loadState('main-container')}catch(e){}
			</script>

			<!-- 公共页面的侧边栏 -->
			<div th:replace="admin/common/sidebar :: sidebar"></div>

			<div class="main-content">
				<div class="main-content-inner">
					<div class="breadcrumbs ace-save-state" id="breadcrumbs">
						<ul class="breadcrumb">
							<li>
								<i class="ace-icon fa fa-home home-icon"></i>
								<a href="/admin/index">主页</a>
							</li>
							<li>系统设置</li>
							<li>邮件服务器配置</li>
						</ul><!-- /.breadcrumb -->

						<!-- 公共页面的搜索框 -->
						<div th:replace="admin/common/search :: search"></div>
						
					</div>

					<div class="page-content">
						
						<!-- 引入公共的settings-container -->
						<div th:replace="admin/common/settingsContainer :: settings-container"></div>
						
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<form class="form-horizontal" role="form" th:action="@{/admin/settings/emails/save}" th:method="post" th:object="${emailServerConf}">
									<div class="form-group hidden">
										<label class="col-sm-4 control-label no-padding-right"> id </label>

										<div class="col-sm-8">
											<input type="text" th:field="*{id}" placeholder="id" class="col-xs-12 col-sm-6"/>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-4 control-label no-padding-right"> 邮箱服务器 </label>

										<div class="col-sm-8">
											<input type="text" th:field="*{host}" placeholder="邮箱服务器地址，如：smtp.163.com" class="col-xs-12 col-sm-6" required="required"/>
										</div>
									</div>

									<div class="space-4"></div>
									
									<div class="form-group">
										<label class="col-sm-4 control-label no-padding-right"> 发件邮箱 </label>

										<div class="col-sm-8">
											<input type="text" th:field="*{username}" placeholder="发送邮件的邮箱账号，如：163@163.com" class="col-xs-12 col-sm-6" required="required"/>
										</div>
									</div>

									<div class="space-4"></div>
									
									<div class="form-group">
										<label class="col-sm-4 control-label no-padding-right"> 密码/授权码 </label>

										<div class="col-sm-8">
											<input type="text" th:field="*{password}" placeholder="根据不同的邮箱填写密码或者授权码" class="col-xs-12 col-sm-6" required="required"/>
										</div>
									</div>

									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-4 control-label no-padding-right"> 发送端口号 </label>

										<div class="col-sm-8">
											<input type="text" th:field="*{port}" placeholder="邮箱服务器端口，不写默认为25" class="col-xs-12 col-sm-6" />
										</div>
									</div>

									<div class="space-4"></div>
									
									<div class="form-group">
										<label class="col-sm-4 control-label no-padding-right" for="form-field-1"> 是否使用SSL连接 </label>

										<div class="col-sm-8">
											<label>
												<input name="ssl" class="ace ace-switch ace-switch-5" type="checkbox" th:if="*{isSsl == 1}" checked="checked"/>
												<input name="ssl" class="ace ace-switch ace-switch-5" type="checkbox" th:if="*{isSsl != 1}"/>
												<span class="lbl"></span>
											</label>
										</div>
									</div>

									<div class="space-4"></div>
									
									<div class="form-group">
										<label class="col-sm-4 control-label no-padding-right"> 发件人名称 </label>

										<div class="col-sm-8">
											<input type="text" th:field="*{senderName}" placeholder="发件人名称，如：张三" class="col-xs-12 col-sm-6" />
											<!-- <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right" data-content="More details.">?</span> -->
										</div>
									</div>

									<div class="space-4"></div>
									
									<div class="clearfix form-actions">
										<div class="col-md-offset-4 col-md-8">
											<button class="btn btn-info" type="submit">
												<i class="ace-icon fa fa-check bigger-110"></i>
												提交
											</button>

											&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
											<button class="btn" type="reset">
												<i class="ace-icon fa fa-undo bigger-110"></i>
												重置
											</button>
										</div>
									</div>
								</form>

							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->

			<!-- 公共页面的尾部 -->
			<div th:replace="admin/common/footer :: footer"></div>

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->
		<script th:src="@{/static/admin/js/jquery/jquery-2.1.4.min.js}"></script>
		<!-- <![endif]-->

		<!--[if IE]>
		<script th:src="@{/static/admin/js/jquery/jquery-1.11.3.min.js}"></script>
		<![endif]-->
		
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) 
				document.write("<script th:src='@{/static/admin/js/jquery/jquery.mobile.custom.min.js}'>"+"<"+"/script>");
		</script>
		
		<script th:src="@{/static/admin/js/bootstrap/bootstrap.min.js}"></script>

		<!-- page specific plugin scripts -->

		<!--[if lte IE 8]>
		  <script th:src="@{/static/admin/js/plugins/excanvas.min.js}"></script>
		<![endif]-->
		<script th:src="@{/static/admin/js/jquery-ui/jquery-ui.custom.min.js}"></script>
		<script th:src="@{/static/admin/js/jquery-ui/jquery.ui.touch-punch.min.js}"></script>

		<!-- ace scripts -->
		<script th:src="@{/static/admin/js/ace/ace-elements.min.js}"></script>
		<script th:src="@{/static/admin/js/ace/ace.min.js}"></script>
		
		<script type="text/javascript" th:src="@{/static/admin/js/gweb/gweb.js}"></script>

		<!-- inline scripts related to this page -->
		<script type="text/javascript">
			jQuery(function($) {
				//激活popover提示框
				$('[data-rel=popover]').popover({container:'body'});
			});
		</script>
	</body>
</html>
